<template>
  <!--AI 金融模板-->
  <line-item class="ai-fin-template-line" :timeline-item="timelineItem">
    <template v-for="(_, index) in blockArr" :slot="index">
      <div class="image-position show-padding" :style="{ backgroundImage: `url(${coverSrc})` }">
        <span v-show="!coverSrc">{{ templateName }}</span>
      </div>
    </template>
  </line-item>
</template>

<script>
import singleMixins from '@veditor/components/timeLine/js/singleMixins';

export default {
  name: 'AiFinTemplate',
  mixins: [singleMixins],
  computed: {
    coverSrc() {
      return this.timelineItem.coverSrc;
    },
    templateName() {
      return this.timelineItem.templateName;
    },
  },
};
</script>

<style lang="stylus">
.ai-fin-template-line
  .line-item
    background-color #4d4877
    color #8070e1
</style>
